require('../ServiceManager.js')

var mgr = new org.jsmud.ServiceManager();

mgr.getService('mongo', function(mongo){
	var room = mongo.getDb('room');
	room.on('ready', function(){
		console.log("Room : " + room);
		room.find({}, function(items){
			//console.log(items);
		});
	})
})

mgr.getService('room', function(room){
	room.find({}, function(items, session){
		//console.log(items);
		session.find({example:{name:'[Title]'}}, function(items){
			//console.log(items);
		})
	},function(err){
		console.log(err);
	});
});